package com.hwh.service.emp.impl;

import java.util.List;

import com.hwh.DAO.emp.EmpWorkDetailDAO;
import com.hwh.model.emp.EmpWorkDetail;
import com.hwh.service.emp.EmpWorkDetailService;

public class EmpWorkDetailServiceImpl implements EmpWorkDetailService {

	private EmpWorkDetailDAO empWorkDetailDAO;
	public EmpWorkDetailDAO getEmpWorkDetailDAO() {
		return empWorkDetailDAO;
	}

	public void setEmpWorkDetailDAO(EmpWorkDetailDAO empWorkDetailDAO) {
		this.empWorkDetailDAO = empWorkDetailDAO;
	}

	public void addEmpWorkDetail(EmpWorkDetail empWorkDetail) {

		empWorkDetailDAO.save(empWorkDetail);
	}

	public void deleteEmpWorkDetail(String id) {
		empWorkDetailDAO.delete(empWorkDetailDAO.findById(id));

	}

	public void updataEmpWorkDetail(EmpWorkDetail empWorkDetail) {
		// TODO Auto-generated method stub
		empWorkDetailDAO.save(empWorkDetail);
	}

	public List findEmpWorkDetail(String propertyName, Object value) {
		// TODO Auto-generated method stub
		return empWorkDetailDAO.findByProperty(propertyName, value);
	}

	public List findAllEmpWorkDetail() {
		// TODO Auto-generated method stub
		return empWorkDetailDAO.findAll();
	}

	public List findByPage(int currentPage, int pageSize) {
		// TODO Auto-generated method stub
		return empWorkDetailDAO.findByPage(currentPage, pageSize);
	}

}
